import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;

public class ClassLoaderTest {

    public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException, NoSuchMethodException, InvocationTargetException {
        MyClassLoader myClassLoader = new MyClassLoader();
        Class<?> clazz   = myClassLoader.findClass("Hello");
        Object  hello = clazz.getDeclaredConstructor().newInstance();
        Method method = clazz.getDeclaredMethod("sayHello");
        method.invoke(hello);
    }
}
